import { request } from '@/sheep/request';

export default {
addGoods: (store_id,goods_id) =>
  request({
	url: `goods/goods/oneClickStocking/${store_id}/${goods_id}`,
	method: 'GET'
  }),
  shopSelectList: (data) =>
    request({ // 铺货列表
      url: 'goods/goods/shopSelectList',
      method: 'POST',
      data
    }),
  distributionDetail: () =>
    request({ // 铺货设置detail
      url: 'distribution/detail',
      method: 'GET',
    }),
  distributionAdd: (data) =>
    request({ // 铺货设置add
      url: 'distribution/add',
      method: 'POST',
      data
    }),
  distributionEdit: (data) =>
    request({ // 铺货设置edit
      url: 'distribution/edit',
      method: 'PUT',
      data
    }),
  distributionRecord: (store_id, params) =>
    request({ // 铺货记录
      url: `goods/goods/clickStockingRecord/${store_id}`,
      method: 'GET',
      params
    }),
  getGoodsCate: (params) =>
    request({ // 快速出货，热款，严选品类
      url: 'shop/admin/goods/goods',
      method: 'GET',
      params
    }),
  getCollectList: (params) =>
    request({ // 收藏列表
      url: 'collect/list',
      method: 'GET',
      params
    }),
  getCollectAdd: (params) =>
    request({ // 添加收藏
      url: 'collect/add',
      method: 'POST',
      params
    }),
  shopSelectDetails: (id) =>
    request({ // 商品detial
      url: `goods/goods/shopSelectDetails/${id}`,
      method: 'GET',
    }),
  getCollectDel: (id) =>
    request({ // 添加收藏
      url: `collect/delete/${id}`,
      method: 'DELETE',
    }),
  getDispatchList: () =>
    request({ // 运费list-用于弹框
      url: `distribution/dispatchList`,
      method: 'GET',
    }),
  unBindGoods: (data) =>
      request({ // 解除货源
        url: 'goods/goods/noBindGoods',
        method: 'PUT',
        data
      }),
};
